3.4.72 \(\int \cos (a+b x) (d \tan (a+b x))^n \, dx\) [372]

Optimal. Leaf size=72 \[ \frac {\cos (a+b x) \cos ^2(a+b x)^{n/2} \, _2F_1\left (\frac {n}{2},\frac {1+n}{2};\frac {3+n}{2};\sin ^2(a+b x)\right ) (d \tan (a+b x))^{1+n}}{b d (1+n)} \]

[Out]

cos(b*x+a)*(cos(b*x+a)^2)^(1/2*n)*hypergeom([1/2*n, 1/2+1/2*n],[3/2+1/2*n],sin(b*x+a)^2)*(d*tan(b*x+a))^(1+n)/
b/d/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2697} \begin {gather*} \frac {\cos (a+b x) \cos ^2(a+b x)^{n/2} (d \tan (a+b x))^{n+1} \, _2F_1\left (\frac {n}{2},\frac {n+1}{2};\frac {n+3}{2};\sin ^2(a+b x)\right )}{b d (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]*(d*Tan[a + b*x])^n,x]

[Out]

(Cos[a + b*x]*(Cos[a + b*x]^2)^(n/2)*Hypergeometric2F1[n/2, (1 + n)/2, (3 + n)/2, Sin[a + b*x]^2]*(d*Tan[a + b
*x])^(1 + n))/(b*d*(1 + n))

Rule 2697

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*Sec[e + f
*x])^m*(b*Tan[e + f*x])^(n + 1)*((Cos[e + f*x]^2)^((m + n + 1)/2)/(b*f*(n + 1)))*Hypergeometric2F1[(n + 1)/2,
(m + n + 1)/2, (n + 3)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rubi steps

\begin {align*} \int \cos (a+b x) (d \tan (a+b x))^n \, dx &=\frac {\cos (a+b x) \cos ^2(a+b x)^{n/2} \, _2F_1\left (\frac {n}{2},\frac {1+n}{2};\frac {3+n}{2};\sin ^2(a+b x)\right ) (d \tan (a+b x))^{1+n}}{b d (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
time = 2.54, size = 452, normalized size = 6.28 \begin {gather*} -\frac {2 \left (F_1\left (\frac {1+n}{2};n,1;\frac {3+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-2 F_1\left (\frac {1+n}{2};n,2;\frac {3+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )\right ) \cos \left (\frac {1}{2} (a+b x)\right ) \cos (a+b x) \sin \left (\frac {1}{2} (a+b x)\right ) (d \tan (a+b x))^n}{b (1+n) \left (-F_1\left (\frac {1+n}{2};n,1;\frac {3+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )+\frac {\left (-\left (\left (F_1\left (\frac {3+n}{2};n,2;\frac {5+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-4 F_1\left (\frac {3+n}{2};n,3;\frac {5+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-n F_1\left (\frac {3+n}{2};1+n,1;\frac {5+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )+2 n F_1\left (\frac {3+n}{2};1+n,2;\frac {5+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )\right ) (-1+\cos (a+b x))\right )+(3+n) F_1\left (\frac {1+n}{2};n,2;\frac {3+n}{2};\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right ) (1+\cos (a+b x))\right ) \sec ^2\left (\frac {1}{2} (a+b x)\right )}{3+n}\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[a + b*x]*(d*Tan[a + b*x])^n,x]

[Out]

(-2*(AppellF1[(1 + n)/2, n, 1, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] - 2*AppellF1[(1 + n)/2, n,
2, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2])*Cos[(a + b*x)/2]*Cos[a + b*x]*Sin[(a + b*x)/2]*(d*Tan[
a + b*x])^n)/(b*(1 + n)*(-AppellF1[(1 + n)/2, n, 1, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] + ((-(
(AppellF1[(3 + n)/2, n, 2, (5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] - 4*AppellF1[(3 + n)/2, n, 3, (
5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] - n*AppellF1[(3 + n)/2, 1 + n, 1, (5 + n)/2, Tan[(a + b*x)/
2]^2, -Tan[(a + b*x)/2]^2] + 2*n*AppellF1[(3 + n)/2, 1 + n, 2, (5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2
]^2])*(-1 + Cos[a + b*x])) + (3 + n)*AppellF1[(1 + n)/2, n, 2, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2
]^2]*(1 + Cos[a + b*x]))*Sec[(a + b*x)/2]^2)/(3 + n)))

________________________________________________________________________________________

Maple [F]
time = 0.16, size = 0, normalized size = 0.00 \[\int \cos \left (b x +a \right ) \left (d \tan \left (b x +a \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)*(d*tan(b*x+a))^n,x)

[Out]

int(cos(b*x+a)*(d*tan(b*x+a))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*(d*tan(b*x+a))^n,x, algorithm="maxima")

[Out]

integrate((d*tan(b*x + a))^n*cos(b*x + a), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*(d*tan(b*x+a))^n,x, algorithm="fricas")

[Out]

integral((d*tan(b*x + a))^n*cos(b*x + a), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \tan {\left (a + b x \right )}\right )^{n} \cos {\left (a + b x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*(d*tan(b*x+a))**n,x)

[Out]

Integral((d*tan(a + b*x))**n*cos(a + b*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*(d*tan(b*x+a))^n,x, algorithm="giac")

[Out]

integrate((d*tan(b*x + a))^n*cos(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \cos \left (a+b\,x\right )\,{\left (d\,\mathrm {tan}\left (a+b\,x\right )\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)*(d*tan(a + b*x))^n,x)

[Out]

int(cos(a + b*x)*(d*tan(a + b*x))^n, x)

________________________________________________________________________________________